package com.pacy.pacybaseproject.popups;

import android.content.Context;
import android.content.Intent;
import android.widget.ImageView;
import android.widget.TextView;


import com.lxj.xpopup.core.CenterPopupView;
import com.pacy.pacybaseproject.R;
import com.pacy.pacybaseproject.activitys.ExchangeDetailActivity;

import io.reactivex.annotations.NonNull;

/**
 * @author PACY
 * @date 2024/1/16
 * description: 确认兑换
 */
public class ExChangePopup extends CenterPopupView {
    private TextView closeTv,exchangeTv;
    private ImageView closeIv;
    public ExChangePopup(@NonNull Context context) {
        super(context);
    }

    @Override
    protected int getImplLayoutId() {
        return R.layout.exchange_popup_view;
    }

    @Override
    protected void onCreate() {
        super.onCreate();
        closeTv=findViewById(R.id.close_tv);
        closeIv=findViewById(R.id.close_iv);
        exchangeTv=findViewById(R.id.exchange_tv);
        closeTv.setOnClickListener(v -> dismiss());
        closeIv.setOnClickListener(v -> dismiss());
        exchangeTv.setOnClickListener(v->getContext().startActivity(new Intent(getContext(), ExchangeDetailActivity.class)));
    }

}
